<?php

/*
 * CopyRight  : (C)2012-2099 HaoTeam Inc.
 * Document   : AuthApi.php
 * Created on : 2021-2-28 9:46:05
 * Author     : Tiger <1192851302@qq.com>
 * Description: This is NOT a freeware, use is subject to license terms.
 *              这即使是一个免费软件,使用时也请遵守许可证条款,得到当时人书面许可.
 *              未经书面许可,不得翻版,翻版必究;版权归属 HaoTeam Inc;
 */

namespace miniapp\fleet\controller;

use haoteam\service\UtilService;
use miniapp\fleet\model\WechatAppAddonFleetGroup;

/**
 * 需要鉴权的Api
 * Class AuthApi
 * Tiger <1192851302@qq.com> 2021-2-28 9:46:05
 */
class AuthApi extends AuthCommon {

    /**
     * 群组首页
     * @author Tiger <1192851302@qq.com>
     * @return type
     */
    public function GroupIndex() {
        return app('json')->successful('ok', [
                    'group' => WechatAppAddonFleetGroup::getInfo([
                        'uid' => request()->uid()
                    ]),
                    'menus' => [
                        [
                            'url' => '/pages/group/user/index',
                            'icon' => 'http://www.admin.com/upload/system/20210226/93fc1740760c014c40f0e56a6a67d59d.jpg',
                            'title' => '群组成员'
                        ],
                        [
                            'url' => '#',
                            'icon' => 'http://www.admin.com/upload/system/20210226/93fc1740760c014c40f0e56a6a67d59d.jpg',
                            'title' => '测试菜单2'
                        ],
                        [
                            'url' => '#',
                            'icon' => 'http://www.admin.com/upload/system/20210226/93fc1740760c014c40f0e56a6a67d59d.jpg',
                            'title' => '测试菜单3'
                        ],
                        [
                            'url' => '#',
                            'icon' => 'http://www.admin.com/upload/system/20210226/93fc1740760c014c40f0e56a6a67d59d.jpg',
                            'title' => '测试菜单4'
                        ],
                        [
                            'url' => '#',
                            'icon' => 'http://www.admin.com/upload/system/20210226/93fc1740760c014c40f0e56a6a67d59d.jpg',
                            'title' => '测试菜单5'
                        ],
                        [
                            'url' => '#',
                            'icon' => 'http://www.admin.com/upload/system/20210226/93fc1740760c014c40f0e56a6a67d59d.jpg',
                            'title' => '测试菜单6'
                        ]
                    ]
        ]);
    }

    public function GroupUsers() {
        
    }

}
